package com.study;

public class Extends01 {
    public static void main(String[] args) {
//        Son01 son01 = new Son01(32);
        Son01 son01 = new Son01(32,"龙");
//        Son01 son01 = new Son01();

//
        System.out.println("------------------------原封不动拿来用-----------------------------");
        System.out.println("我姓：" + son01.xingShi + "，从我爹那直接继承过来的！");
        System.out.println(son01.moTuo() + "这也是从我爹那直接继承过来的！");
//
//
        System.out.println("------------------------我爹未赋值，我来赋值并使用-----------------------------");
        son01.money = 10000.0;
        son01.showMoney();
//
//
        System.out.println("------------------------重写父类属性和方法-----------------------------");
        son01.showHouse();
        son01.hobby();
//
//
        System.out.println("------------------------super关键字-----------------------------");
        son01.showHouse();
        son01.work();
        System.out.println("我今年" + son01.age + "岁了。" );
        System.out.println("我今年" + son01.age + "岁了。我的名字叫做" + son01.name );
    }
}
